Skip to content

Publish accepted work and file scrubbed problem notes after duplicate searches - #397

Merged
oxa-orchestrator[bot] merged 49 commits into
mainfrom
agent/333-work-publish
Nov 18, 2026
Merged

oxa-orchestrator[bot] merged 49 commits into
mainfrom
agent/333-work-publish

Conversation

@n0rpan

@n0rpan n0rpan commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Feature A (native work board) and the work-reporting path for Feature I. Owner acceptance #1214

T3 — opt-in work publication and scrubbed problem reporting (#333). Ready at the current main refresh.

oxa work ... --publish pushes the accepted saved commit only after controlling-terminal approval. Both publication and problem-reporting flags default off and reject agent-originated invocation; offline publication refuses. Notes pass through the trusted frontend scrubber before checkpoint/emission. Publication retains the origin host, checks queue membership after confirmation, and updates only its managed acceptance section while preserving owner-written PR text.

Terminal action recovery preserves the accepted head on an ordinary invocation. Explicit rerun of Publishing/Reporting freezes fresh execution/check inputs and runs validation again. Unfinished worker/save deadlines, saved offline restrictions, report serialization and actual save retry semantics are retained.

Removes: superseded inherited host-shell runner, flat Git-local checkpoints and old CLI adapters, replaced by main's trusted supervisor/checkpoint APIs. Payload-bearing note persistence, unchecked-head resealing and stale PR metadata are removed; owner text and existing protections remain. No new scanner or project-hook execution is introduced. The credential-scanner claim assumes approved publication of project-readable content, which the published SECURITY.md threat-model exclusions and issue333 do not promise to prevent; source-backed adjudication is397comment6958079581. No masked-credential or approval bypass was established by that claim.

Validation: both publication-recovery regressions failed in44146808409 and passed in44148608394 on both architectures at95c55cba. Prior privacy/origin/body, real-worker save retry, red/no-push, real-TTY, offline and queue controls remain. Current head cb7ae1f normally merges main a86ba95, preserving native helper_queue alongside publication; draft checks44155708702 passed and lane44155693005 is running. No local builds/tests or real providers/keys; hosted fixtures use synthetic data and isolated HOME. Current required CI, Cloud qualification and the narrow execution/auth boundary read remain gates. Auto-approver owns review requests; no repeated builder request or merge clearance is implied.

Main refresh

dcd4f463a26a5bcb2627cc3c6cb5d616d9a4d5f6 merges main 78d1dda2. The two conflict resolutions retain main's protected work-storage check, committed verification and mirror declarations, plus this PR's publication and report routes. The publication/report modules and dedicated tests are byte-identical to cb7ae1fd. The shared dispatch has formatting changes from composing both routes.

Ports the post-commit push hook and dogfood reporting rows of #307 at the opt-in work publication and report boundary. Hosted lane 44174046845 and draft checks 44174060604 record qualification for this head. The required draft gate passed and the PR is ready for full required checks.

Publication recovery and committed acceptance

Repair head 8ac1cc9754adefef06bc0094c12f6fd55f153222 preserves pending saves when publication is requested early. A resumed save must pass acceptance on its recovered commit before receiving a successful result. Publication runs frozen acceptance against the clean committed export before contacting GitHub, then checks that proof again before pushing. Problem reports share the bounded command runner and keep the task lock in the child.

Removes: the duplicate report subprocess runner and the use of prior success as proof for a recovered save or publication.

The test-first lane failed on the publication regressions. The fixed x86_64 and ARM64 lane passed for oxa-work and its affected consumers, including oxa-cli. The draft required gate passed and this head was marked ready. Full ready checks 44180507432 passed.

Main refresh after #1162

Earlier refreshed head 23eaa743ba5626534ac223ffcd2e717ee13c0526 includes main edae4644. The two normal merges adopt the shared bounded command runner that main moved into oxa-work and retain both the existing refill and report routes. The report command still carries the task lock into the child. Publication and clean committed acceptance use the same code and tests qualified above.

Current required checks · Current hosted lane

Protected checkpoint refresh

Head adde48e3f774a96014b451592978a7c7fbb9eeb5 merges main f02fc17b. Action recovery uses main's checked checkpoint loader. Publication and report retries also validate the protected storage and task lock before loading their checkpoint. The Work2 refill and shared lead HTTP modules remain available.

Exact required checks · Exact hosted lane

The refreshed head passed the affected oxa-work and oxa-cli hosted lane on x86_64 and ARM64 and the full required ready checks. Codex code and security reviews reported no findings at this exact head.

Code review receipt · Security review receipt

Shared report deadline refresh

Head 2c1b106d8bad6587fbcb0b0f80410d0eb3827ade merges main 66e9591f. The report subprocess uses the landed shared runner, with its existing output limit and task lock on stdin. Required checks · Hosted lane

The exact shared-deadline head passed its required workflow and both hosted architecture lanes. Codex review at this head reported no major issues. The Rust CodeQL analysis was still running at verification.

Publication destination and subprocess guards

Head 373b8bdfb9f149fc798c46ec02e29b984f19d1de runs GitHub publication and Git push through the shared bounded runner with the task lock. The approved origin uses the CLI's saved login for that host. Existing PR updates require a same-repository head. Problem reports display and use the same qualified GitHub.com repository.

The test-first lane reproduced oversized metadata acceptance, ambient enterprise credential forwarding and same-owner fork acceptance. The repair is under hosted oxa-work/oxa-cli qualification and CodeQL.

Qualification after #1090 landed

The normal conflict resolution preserves the #1090 PR packet route alongside the publication flags. Publication code, report code and their dedicated tests match the previously qualified repair. The refreshed head passed the required workflow and the hosted oxa-work/oxa-cli lane on x86_64 and ARM64.

Head 41c4b8986ea2e8e2cfc3092a3fcb0b4a58ad62a1.

Conflict refresh after #1043 and #1099

Head cb8174daef75d94fc8f8aa0bc0f964a4687b381c. The normal merge retains #1043 batch base normalization and #1099 supervisor isolation alongside publication and action recovery. The publication and report modules match the previously qualified versions.

Hosted lane · Required checks

@n0rpan
n0rpan marked this pull request as ready for review November 15, 2026 17:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T23:53:02.415946Z cb8174d Manual request
🔒 Security Review ✅ Completed 2026-11-17T23:55:22.313617Z cb8174d Manual request

Security findings

Advisory findings (4)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 232eb0efc7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread oxa/oxa-work/src/lib.rs Resolved
Comment thread oxa/oxa-work/src/lib.rs Resolved
@n0rpan

n0rpan commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator Author

First-pass review by oxa → oxc → anthropic/claude-opus-5-5 at head 232eb0e (O-241; the orchestrator adjudicates and enqueues).

Codex findings

  • lib.rs:271 sticky offline policy: CONFIRMED. state.offline = offline; replaced |=. If a task started with --offline is resumed without the flag, the agent and acceptance commands run with network on.
  • lib.rs:54 new receipt fields: CONFIRMED. head, pull_request, draft, problem_notes, reports and State.acceptance_outcome have no #[serde(default)]; the only default is on base at lib.rs:23. Any receipt written before this change fails state::read, which breaks resume, --rerun and work --status.

Additional defects

  1. oxa-work/src/publish.rs:47 (value.offline = offline) and publish.rs:~194 (report_notes) — P1: both write the caller's current offline flag into the receipt. A later --publish or --report-problems run without --offline permanently erases the saved offline restriction, even after the lib.rs line is fixed. Codex's finding covers only lib.rs.
  2. oxa-work/src/publish.rs:~201 (reporter(...)?) — P2: if the reporter fails (for example save_draft errors), the function returns before the final save, so the receipt stays at Step::Reporting. lib.rs:258 then returns the stale record early on every later run without --rerun, so the task cannot resume or finish normally.
  3. oxa-work/src/lib.rs:258 combined with publish.rs:~170 — P2: when publishing fails, the step is saved as Publishing with outcome Blocked. A plain re-invocation then returns early instead of resuming or re-checking. Retrying needs --rerun, which runs the agent again from scratch. That contradicts the error message "use --rerun before publishing" only for the head-changed case.

TIER: T3
VERDICT: REVISE

🤖 Generated with Claude Code (oxa review lane)

n0rpan commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator Author

First-pass REVISE addressed at 8bf1f38: both execution and external-write entry points preserve the saved offline restriction (two failing-first cases). Optional publication/report fields default to inactive values while required core state remains strict. Draft-creation errors now become retryable failed-report records and finish the reporting checkpoint; another failing-first case proves plain invocation and --report-problems retry do not replay the agent. All four new regressions and all 208 touched-crate tests pass, plus fmt/clippy/four scans.

The publication-retry point is intentionally opt-in: --publish retries its saved checkpoint without --rerun, as the existing queue/refusal/retry regression demonstrates. A plain task-file invocation does not authorize network writes. --rerun is needed only to re-check branch drift. Continuing queue mode without waiting for re-review.

@n0rpan

n0rpan commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator Author

First-pass review by oxa → oxc → anthropic/claude-opus-5-5 at head 8bf1f38 (O-241; the orchestrator adjudicates and enqueues).

Codex findings

  • oxa/oxa-work/src/lib.rs:271, offline policy cleared on resume: FIXED. Retries now use new_state(task, tree, offline || old.offline) (lib.rs:278), and every run then does state.offline |= offline (lib.rs:283). A saved offline restriction can no longer be cleared.
  • oxa/oxa-work/src/lib.rs:59, new receipt fields break old receipts: FIXED. head, pull_request, draft, problem_notes and reports all have #[serde(default)] (lib.rs:50-59). acceptance_outcome in state.rs also has a default.

New findings

  1. P1: public posting can bypass the user's confirmation. oxa/oxa-cli/src/work_cmd.rs:41
    • The only guard on --publish and --report-problems is that OXA_CODING_AGENT is not set.
    • Inside an agent tool, the model can unset it: env -u OXA_CODING_AGENT oxa work t.json --report-problems. That includes the child agent that oxa work starts itself.
    • The command then runs gh issue create / gh issue comment (work_reports.rs) and git push / gh pr create (publish.rs). There is no /dev/tty confirmation.
    • The posted text is the model's own <oxa-work-reports> output (notes.rs). So the model writes text that is posted publicly with no human review.
    • Normal report-issue submit cannot be bypassed this way: it asks through /dev/tty (report_cmd.rs:407-420), and an agent's bash has no terminal. This weakens the report-issue confirmation and the publishing control.
  2. P2: --rerun now throws away the checkpoint of an interrupted task. oxa/oxa-work/src/lib.rs:273-278
    • Before this PR, a receipt with step != Finished was always resumed. Now, with --rerun, it gets a fresh new_state.
    • Scenario: a run is interrupted in Acceptance, Recheck or Saving, and the user runs it again with --rerun. The saved checkpoint is lost (initial/base, commands, agent_error, failures), and the receipt's problem_notes, reports and pull_request are cleared. The agent prompt is replayed.
    • This is not mentioned in the PR or in docs/work.md, which still describe --rerun as continuing a completed task.

TIER: T3
VERDICT: REVISE

🤖 Generated with Claude Code (oxa review lane)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 23eaa743ba

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread oxa/oxa-cli/src/work_reports.rs Outdated
Comment on lines +15 to +16
command.args(args).current_dir(cwd);
oxa_work::command_runner_with_stdin(command, Some(1_048_576), Stdio::from(lock.try_clone().ok()?))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review

P2 Badge Security: Bind problem reports to an explicit GitHub host

When --report-problems runs with ambient GH_HOST—for example in a GHES shell—this new runner inherits it while every --repo value and confirmation contains only OWNER/NAME. gh therefore sends approved search terms and later issue/comment bodies to GH_HOST, not necessarily the configured public repository. An authenticated unintended host can receive project symptom terms and owner-authorized writes under a misleading destination. Remove ambient host selectors and pass/display a host-qualified repository. The report scrubber is pattern-based, so confirmation is the residual privacy boundary.

SECURITY.md reference: oxa/SECURITY.md:L33-L35

Useful? React with 👍 / 👎.

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: adde48e3f7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: adde48e3f7

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 2c1b106d8b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 2c1b106d8b

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread oxa/oxa-work/src/publish.rs Outdated
Comment on lines +47 to +48
.env_remove("GH_REPO")
.env_remove("GH_HOST")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review

P1 Badge Security: Bind inherited GitHub tokens to the origin host

When GH_ENTERPRISE_TOKEN is set for a legitimate GHES session and origin names an attacker-controlled different host, clear or host-bind the token before this helper runs. It removes GH_HOST but inherits the generic enterprise token; the later gh repo view <origin> occurs before confirmation, and gh attaches that token to the explicit host. Thus requesting --publish in a trusted malicious clone can disclose the user's GitHub token before the prompt identifies the destination. Fresh evidence beyond the prior repository-target issue is the final helper's mismatched host/token handling.

SECURITY.md reference: SECURITY.md:L9-L10

Useful? React with 👍 / 👎.

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 41c4b8986e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 41c4b8986e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: cb8174daef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: cb8174daef

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@oxa-orchestrator
oxa-orchestrator Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 0095e87 Nov 18, 2026
31 checks passed
@oxa-orchestrator
oxa-orchestrator Bot deleted the agent/333-work-publish branch November 18, 2026 00:07
oxa-agent Bot pushed a commit that referenced this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant